#ifndef __WEBPAGESEARCHER_HPP
#define __WEBPAGESEARCHER_HPP
#include "TcpConnection.hpp"
#include "ProtocolParser.hpp"
#include "RedisServer.hpp"

using TcpConnectionPtr = shared_ptr<TcpConnection>;

class ProtocolParser;//协议类的前向声明

class WebPageSearcher
/* :public ProtocolParser //继承 */
{
public:
    WebPageSearcher();
    /* WebPageSearcher(string keys, const TcpConnectionPtr & conn); */
    /* virtual void doQuery() override; */
    void doQuery(const string sought);
    vector<string> getResult();

private:
    /* TcpConnectionPtr _conn;//查询的结果需要借助tcpconnection发给用户 */
    string _sought;//要查的关键词
    MyRedis _redis;
    vector<string> _result;
};


#endif
